using UnityEngine;

public class ToggleEquipped : MonoBehaviour
{
	public GUIItemEquipped Equipped;

	public KeyCode Key;

	private void Start()
	{
	}

	private void Update()
	{
		if (UnityEngine.Input.GetKeyDown(Key) && UnitZ.playerManager != null && UnitZ.playerManager.PlayingCharacter != null && UnitZ.playerManager.PlayingCharacter.inventory != null)
		{
			UnitZ.playerManager.PlayingCharacter.inventory.ToggleUseEquipped(Equipped.CurrentItemCollector);
		}
	}
}
